<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head><!-- start favicons snippet, use https://realfavicongenerator.net/ --><link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"><link rel="manifest" href="/assets/site.webmanifest"><link rel="mask-icon" href="/assets/safari-pinned-tab.svg" color="#fc4d50"><link rel="shortcut icon" href="/assets/favicon.ico"><meta name="msapplication-TileColor" content="#ffc40d"><meta name="msapplication-config" content="/assets/browserconfig.xml"><meta name="theme-color" content="#ffffff"><!-- end favicons snippet -->
<title>Representation.MultiSegmentRepresentation (ExoPlayer library)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="Representation.MultiSegmentRepresentation (ExoPlayer library)";
        }
    }
    catch(err) {
    }
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">com.google.android.exoplayer2.source.dash.manifest</a></div>
<h2 title="Class Representation.MultiSegmentRepresentation" class="title">Class Representation.MultiSegmentRepresentation</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="Representation.html" title="class in com.google.android.exoplayer2.source.dash.manifest">com.google.android.exoplayer2.source.dash.manifest.Representation</a></li>
<li>
<ul class="inheritance">
<li>com.google.android.exoplayer2.source.dash.manifest.Representation.MultiSegmentRepresentation</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="../DashSegmentIndex.html" title="interface in com.google.android.exoplayer2.source.dash">DashSegmentIndex</a></code></dd>
</dl>
<dl>
<dt>Enclosing class:</dt>
<dd><a href="Representation.html" title="class in com.google.android.exoplayer2.source.dash.manifest">Representation</a></dd>
</dl>
<hr>
<pre>public static class <span class="typeNameLabel">Representation.MultiSegmentRepresentation</span>
extends <a href="Representation.html" title="class in com.google.android.exoplayer2.source.dash.manifest">Representation</a>
implements <a href="../DashSegmentIndex.html" title="interface in com.google.android.exoplayer2.source.dash">DashSegmentIndex</a></pre>
<div class="block">A DASH representation consisting of multiple segments.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!--   -->
</a>
<h3>Nested Class Summary</h3>
<ul class="blockList">
<li class="blockList"><a id="nested.classes.inherited.from.class.com.google.android.exoplayer2.source.dash.manifest.Representation">
<!--   -->
</a>
<h3>Nested classes/interfaces inherited from class&nbsp;com.google.android.exoplayer2.source.dash.manifest.<a href="Representation.html" title="class in com.google.android.exoplayer2.source.dash.manifest">Representation</a></h3>
<code><a href="Representation.MultiSegmentRepresentation.html" title="class in com.google.android.exoplayer2.source.dash.manifest">Representation.MultiSegmentRepresentation</a>, <a href="Representation.SingleSegmentRepresentation.html" title="class in com.google.android.exoplayer2.source.dash.manifest">Representation.SingleSegmentRepresentation</a></code></li>
</ul>
</li>
</ul>
</section>
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.com.google.android.exoplayer2.source.dash.manifest.Representation">
<!--   -->
</a>
<h3>Fields inherited from class&nbsp;com.google.android.exoplayer2.source.dash.manifest.<a href="Representation.html" title="class in com.google.android.exoplayer2.source.dash.manifest">Representation</a></h3>
<code><a href="Representation.html#baseUrl">baseUrl</a>, <a href="Representation.html#format">format</a>, <a href="Representation.html#inbandEventStreams">inbandEventStreams</a>, <a href="Representation.html#presentationTimeOffsetUs">presentationTimeOffsetUs</a>, <a href="Representation.html#REVISION_ID_DEFAULT">REVISION_ID_DEFAULT</a>, <a href="Representation.html#revisionId">revisionId</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.com.google.android.exoplayer2.source.dash.DashSegmentIndex">
<!--   -->
</a>
<h3>Fields inherited from interface&nbsp;com.google.android.exoplayer2.source.dash.<a href="../DashSegmentIndex.html" title="interface in com.google.android.exoplayer2.source.dash">DashSegmentIndex</a></h3>
<code><a href="../DashSegmentIndex.html#INDEX_UNBOUNDED">INDEX_UNBOUNDED</a></code></li>
</ul>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(long,com.google.android.exoplayer2.Format,java.lang.String,com.google.android.exoplayer2.source.dash.manifest.SegmentBase.MultiSegmentBase,java.util.List)">MultiSegmentRepresentation</a></span>&#8203;(long&nbsp;revisionId,
                          <a href="../../../Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;format,
                          <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;baseUrl,
                          <a href="SegmentBase.MultiSegmentBase.html" title="class in com.google.android.exoplayer2.source.dash.manifest">SegmentBase.MultiSegmentBase</a>&nbsp;segmentBase,
                          <a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="Descriptor.html" title="class in com.google.android.exoplayer2.source.dash.manifest" target="_top">Descriptor</a>&gt;&nbsp;inbandEventStreams)</code></th>
<td class="colLast">
<div class="block">Creates the multi-segment Representation.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAvailableSegmentCount(long,long)">getAvailableSegmentCount</a></span>&#8203;(long&nbsp;periodDurationUs,
                        long&nbsp;nowUnixTimeUs)</code></th>
<td class="colLast">
<div class="block">Returns the number of available segments in the index.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCacheKey()">getCacheKey</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a cache key for the representation if set, or null.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDurationUs(long,long)">getDurationUs</a></span>&#8203;(long&nbsp;segmentIndex,
             long&nbsp;periodDurationUs)</code></th>
<td class="colLast">
<div class="block">Returns the duration of a segment.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getFirstAvailableSegmentNum(long,long)">getFirstAvailableSegmentNum</a></span>&#8203;(long&nbsp;periodDurationUs,
                           long&nbsp;nowUnixTimeUs)</code></th>
<td class="colLast">
<div class="block">Returns the segment number of the first available segment in the index.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getFirstSegmentNum()">getFirstSegmentNum</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the segment number of the first defined segment in the index.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="../DashSegmentIndex.html" title="interface in com.google.android.exoplayer2.source.dash">DashSegmentIndex</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getIndex()">getIndex</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns an index if the representation provides one directly, or null otherwise.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="RangedUri.html" title="class in com.google.android.exoplayer2.source.dash.manifest">RangedUri</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getIndexUri()">getIndexUri</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a <a href="RangedUri.html" title="class in com.google.android.exoplayer2.source.dash.manifest"><code>RangedUri</code></a> defining the location of the representation's segment index, or
 null if the representation provides an index directly.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getNextSegmentAvailableTimeUs(long,long)">getNextSegmentAvailableTimeUs</a></span>&#8203;(long&nbsp;periodDurationUs,
                             long&nbsp;nowUnixTimeUs)</code></th>
<td class="colLast">
<div class="block">Returns the time, in microseconds, at which a new segment becomes available, or <a href="../../../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> if not applicable.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSegmentCount(long)">getSegmentCount</a></span>&#8203;(long&nbsp;periodDurationUs)</code></th>
<td class="colLast">
<div class="block">Returns the number of segments defined in the index, or <a href="../DashSegmentIndex.html#INDEX_UNBOUNDED"><code>DashSegmentIndex.INDEX_UNBOUNDED</code></a>.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSegmentNum(long,long)">getSegmentNum</a></span>&#8203;(long&nbsp;timeUs,
             long&nbsp;periodDurationUs)</code></th>
<td class="colLast">
<div class="block">Returns <code>getFirstSegmentNum()</code> if the index has no segments or if the given media time is
 earlier than the start of the first segment.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="RangedUri.html" title="class in com.google.android.exoplayer2.source.dash.manifest">RangedUri</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSegmentUrl(long)">getSegmentUrl</a></span>&#8203;(long&nbsp;segmentIndex)</code></th>
<td class="colLast">
<div class="block">Returns a <a href="RangedUri.html" title="class in com.google.android.exoplayer2.source.dash.manifest"><code>RangedUri</code></a> defining the location of a segment.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTimeUs(long)">getTimeUs</a></span>&#8203;(long&nbsp;segmentIndex)</code></th>
<td class="colLast">
<div class="block">Returns the start time of a segment.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isExplicit()">isExplicit</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns true if segments are defined explicitly by the index.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.com.google.android.exoplayer2.source.dash.manifest.Representation">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;com.google.android.exoplayer2.source.dash.manifest.<a href="Representation.html" title="class in com.google.android.exoplayer2.source.dash.manifest">Representation</a></h3>
<code><a href="Representation.html#getInitializationUri()">getInitializationUri</a>, <a href="Representation.html#newInstance(long,com.google.android.exoplayer2.Format,java.lang.String,com.google.android.exoplayer2.source.dash.manifest.SegmentBase)">newInstance</a>, <a href="Representation.html#newInstance(long,com.google.android.exoplayer2.Format,java.lang.String,com.google.android.exoplayer2.source.dash.manifest.SegmentBase,java.util.List)">newInstance</a>, <a href="Representation.html#newInstance(long,com.google.android.exoplayer2.Format,java.lang.String,com.google.android.exoplayer2.source.dash.manifest.SegmentBase,java.util.List,java.lang.String)">newInstance</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></h3>
<code><a href="https://developer.android.com/reference/java/lang/Object.html#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink" target="_top">wait</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;(long,com.google.android.exoplayer2.Format,java.lang.String,com.google.android.exoplayer2.source.dash.manifest.SegmentBase.MultiSegmentBase,java.util.List)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>MultiSegmentRepresentation</h4>
<pre>public&nbsp;MultiSegmentRepresentation&#8203;(long&nbsp;revisionId,
                                  <a href="../../../Format.html" title="class in com.google.android.exoplayer2">Format</a>&nbsp;format,
                                  <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;baseUrl,
                                  <a href="SegmentBase.MultiSegmentBase.html" title="class in com.google.android.exoplayer2.source.dash.manifest">SegmentBase.MultiSegmentBase</a>&nbsp;segmentBase,
                                  @Nullable
                                  <a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="Descriptor.html" title="class in com.google.android.exoplayer2.source.dash.manifest" target="_top">Descriptor</a>&gt;&nbsp;inbandEventStreams)</pre>
<div class="block">Creates the multi-segment Representation.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>revisionId</code> - Identifies the revision of the content.</dd>
<dd><code>format</code> - The format of the representation.</dd>
<dd><code>baseUrl</code> - The base URL of the representation.</dd>
<dd><code>segmentBase</code> - The segment base underlying the representation.</dd>
<dd><code>inbandEventStreams</code> - The in-band event streams in the representation. May be null.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a id="getIndexUri()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIndexUri</h4>
<pre class="methodSignature">@Nullable
public&nbsp;<a href="RangedUri.html" title="class in com.google.android.exoplayer2.source.dash.manifest">RangedUri</a>&nbsp;getIndexUri()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="Representation.html#getIndexUri()">Representation</a></code></span></div>
<div class="block">Returns a <a href="RangedUri.html" title="class in com.google.android.exoplayer2.source.dash.manifest"><code>RangedUri</code></a> defining the location of the representation's segment index, or
 null if the representation provides an index directly.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Representation.html#getIndexUri()">getIndexUri</a></code>&nbsp;in class&nbsp;<code><a href="Representation.html" title="class in com.google.android.exoplayer2.source.dash.manifest">Representation</a></code></dd>
</dl>
</li>
</ul>
<a id="getIndex()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIndex</h4>
<pre class="methodSignature">public&nbsp;<a href="../DashSegmentIndex.html" title="interface in com.google.android.exoplayer2.source.dash">DashSegmentIndex</a>&nbsp;getIndex()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="Representation.html#getIndex()">Representation</a></code></span></div>
<div class="block">Returns an index if the representation provides one directly, or null otherwise.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Representation.html#getIndex()">getIndex</a></code>&nbsp;in class&nbsp;<code><a href="Representation.html" title="class in com.google.android.exoplayer2.source.dash.manifest">Representation</a></code></dd>
</dl>
</li>
</ul>
<a id="getCacheKey()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCacheKey</h4>
<pre class="methodSignature">@Nullable
public&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;getCacheKey()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="Representation.html#getCacheKey()">Representation</a></code></span></div>
<div class="block">Returns a cache key for the representation if set, or null.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Representation.html#getCacheKey()">getCacheKey</a></code>&nbsp;in class&nbsp;<code><a href="Representation.html" title="class in com.google.android.exoplayer2.source.dash.manifest">Representation</a></code></dd>
</dl>
</li>
</ul>
<a id="getSegmentUrl(long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSegmentUrl</h4>
<pre class="methodSignature">public&nbsp;<a href="RangedUri.html" title="class in com.google.android.exoplayer2.source.dash.manifest">RangedUri</a>&nbsp;getSegmentUrl&#8203;(long&nbsp;segmentIndex)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../DashSegmentIndex.html#getSegmentUrl(long)">DashSegmentIndex</a></code></span></div>
<div class="block">Returns a <a href="RangedUri.html" title="class in com.google.android.exoplayer2.source.dash.manifest"><code>RangedUri</code></a> defining the location of a segment.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../DashSegmentIndex.html#getSegmentUrl(long)">getSegmentUrl</a></code>&nbsp;in interface&nbsp;<code><a href="../DashSegmentIndex.html" title="interface in com.google.android.exoplayer2.source.dash">DashSegmentIndex</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>segmentIndex</code> - The segment number.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The <a href="RangedUri.html" title="class in com.google.android.exoplayer2.source.dash.manifest"><code>RangedUri</code></a> defining the location of the data.</dd>
</dl>
</li>
</ul>
<a id="getSegmentNum(long,long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSegmentNum</h4>
<pre class="methodSignature">public&nbsp;long&nbsp;getSegmentNum&#8203;(long&nbsp;timeUs,
                          long&nbsp;periodDurationUs)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../DashSegmentIndex.html#getSegmentNum(long,long)">DashSegmentIndex</a></code></span></div>
<div class="block">Returns <code>getFirstSegmentNum()</code> if the index has no segments or if the given media time is
 earlier than the start of the first segment. Returns <code>getFirstSegmentNum() +
 getSegmentCount() - 1</code> if the given media time is later than the end of the last segment.
 Otherwise, returns the segment number of the segment containing the given media time.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../DashSegmentIndex.html#getSegmentNum(long,long)">getSegmentNum</a></code>&nbsp;in interface&nbsp;<code><a href="../DashSegmentIndex.html" title="interface in com.google.android.exoplayer2.source.dash">DashSegmentIndex</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>timeUs</code> - The time in microseconds.</dd>
<dd><code>periodDurationUs</code> - The duration of the enclosing period in microseconds, or <a href="../../../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> if the period's duration is not yet known.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The segment number of the corresponding segment.</dd>
</dl>
</li>
</ul>
<a id="getTimeUs(long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTimeUs</h4>
<pre class="methodSignature">public&nbsp;long&nbsp;getTimeUs&#8203;(long&nbsp;segmentIndex)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../DashSegmentIndex.html#getTimeUs(long)">DashSegmentIndex</a></code></span></div>
<div class="block">Returns the start time of a segment.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../DashSegmentIndex.html#getTimeUs(long)">getTimeUs</a></code>&nbsp;in interface&nbsp;<code><a href="../DashSegmentIndex.html" title="interface in com.google.android.exoplayer2.source.dash">DashSegmentIndex</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>segmentIndex</code> - The segment number.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The corresponding start time in microseconds.</dd>
</dl>
</li>
</ul>
<a id="getDurationUs(long,long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDurationUs</h4>
<pre class="methodSignature">public&nbsp;long&nbsp;getDurationUs&#8203;(long&nbsp;segmentIndex,
                          long&nbsp;periodDurationUs)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../DashSegmentIndex.html#getDurationUs(long,long)">DashSegmentIndex</a></code></span></div>
<div class="block">Returns the duration of a segment.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../DashSegmentIndex.html#getDurationUs(long,long)">getDurationUs</a></code>&nbsp;in interface&nbsp;<code><a href="../DashSegmentIndex.html" title="interface in com.google.android.exoplayer2.source.dash">DashSegmentIndex</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>segmentIndex</code> - The segment number.</dd>
<dd><code>periodDurationUs</code> - The duration of the enclosing period in microseconds, or <a href="../../../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> if the period's duration is not yet known.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The duration of the segment, in microseconds.</dd>
</dl>
</li>
</ul>
<a id="getFirstSegmentNum()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFirstSegmentNum</h4>
<pre class="methodSignature">public&nbsp;long&nbsp;getFirstSegmentNum()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../DashSegmentIndex.html#getFirstSegmentNum()">DashSegmentIndex</a></code></span></div>
<div class="block">Returns the segment number of the first defined segment in the index.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../DashSegmentIndex.html#getFirstSegmentNum()">getFirstSegmentNum</a></code>&nbsp;in interface&nbsp;<code><a href="../DashSegmentIndex.html" title="interface in com.google.android.exoplayer2.source.dash">DashSegmentIndex</a></code></dd>
</dl>
</li>
</ul>
<a id="getFirstAvailableSegmentNum(long,long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFirstAvailableSegmentNum</h4>
<pre class="methodSignature">public&nbsp;long&nbsp;getFirstAvailableSegmentNum&#8203;(long&nbsp;periodDurationUs,
                                        long&nbsp;nowUnixTimeUs)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../DashSegmentIndex.html#getFirstAvailableSegmentNum(long,long)">DashSegmentIndex</a></code></span></div>
<div class="block">Returns the segment number of the first available segment in the index.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../DashSegmentIndex.html#getFirstAvailableSegmentNum(long,long)">getFirstAvailableSegmentNum</a></code>&nbsp;in interface&nbsp;<code><a href="../DashSegmentIndex.html" title="interface in com.google.android.exoplayer2.source.dash">DashSegmentIndex</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>periodDurationUs</code> - The duration of the enclosing period in microseconds, or <a href="../../../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> if the period's duration is not yet known.</dd>
<dd><code>nowUnixTimeUs</code> - The current time in milliseconds since the Unix epoch.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The number of the first available segment.</dd>
</dl>
</li>
</ul>
<a id="getSegmentCount(long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSegmentCount</h4>
<pre class="methodSignature">public&nbsp;long&nbsp;getSegmentCount&#8203;(long&nbsp;periodDurationUs)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../DashSegmentIndex.html#getSegmentCount(long)">DashSegmentIndex</a></code></span></div>
<div class="block">Returns the number of segments defined in the index, or <a href="../DashSegmentIndex.html#INDEX_UNBOUNDED"><code>DashSegmentIndex.INDEX_UNBOUNDED</code></a>.

 <p>An unbounded index occurs if a dynamic manifest uses SegmentTemplate elements without a
 SegmentTimeline element, and if the period duration is not yet known. In this case the caller
 can query the available segment using <a href="../DashSegmentIndex.html#getFirstAvailableSegmentNum(long,long)"><code>DashSegmentIndex.getFirstAvailableSegmentNum(long, long)</code></a> and
 <a href="../DashSegmentIndex.html#getAvailableSegmentCount(long,long)"><code>DashSegmentIndex.getAvailableSegmentCount(long, long)</code></a>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../DashSegmentIndex.html#getSegmentCount(long)">getSegmentCount</a></code>&nbsp;in interface&nbsp;<code><a href="../DashSegmentIndex.html" title="interface in com.google.android.exoplayer2.source.dash">DashSegmentIndex</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>periodDurationUs</code> - The duration of the enclosing period in microseconds, or <a href="../../../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> if the period's duration is not yet known.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The number of segments in the index, or <a href="../DashSegmentIndex.html#INDEX_UNBOUNDED"><code>DashSegmentIndex.INDEX_UNBOUNDED</code></a>.</dd>
</dl>
</li>
</ul>
<a id="getAvailableSegmentCount(long,long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAvailableSegmentCount</h4>
<pre class="methodSignature">public&nbsp;long&nbsp;getAvailableSegmentCount&#8203;(long&nbsp;periodDurationUs,
                                     long&nbsp;nowUnixTimeUs)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../DashSegmentIndex.html#getAvailableSegmentCount(long,long)">DashSegmentIndex</a></code></span></div>
<div class="block">Returns the number of available segments in the index.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../DashSegmentIndex.html#getAvailableSegmentCount(long,long)">getAvailableSegmentCount</a></code>&nbsp;in interface&nbsp;<code><a href="../DashSegmentIndex.html" title="interface in com.google.android.exoplayer2.source.dash">DashSegmentIndex</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>periodDurationUs</code> - The duration of the enclosing period in microseconds, or <a href="../../../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> if the period's duration is not yet known.</dd>
<dd><code>nowUnixTimeUs</code> - The current time in milliseconds since the Unix epoch.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The number of available segments in the index.</dd>
</dl>
</li>
</ul>
<a id="getNextSegmentAvailableTimeUs(long,long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNextSegmentAvailableTimeUs</h4>
<pre class="methodSignature">public&nbsp;long&nbsp;getNextSegmentAvailableTimeUs&#8203;(long&nbsp;periodDurationUs,
                                          long&nbsp;nowUnixTimeUs)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../DashSegmentIndex.html#getNextSegmentAvailableTimeUs(long,long)">DashSegmentIndex</a></code></span></div>
<div class="block">Returns the time, in microseconds, at which a new segment becomes available, or <a href="../../../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> if not applicable.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../DashSegmentIndex.html#getNextSegmentAvailableTimeUs(long,long)">getNextSegmentAvailableTimeUs</a></code>&nbsp;in interface&nbsp;<code><a href="../DashSegmentIndex.html" title="interface in com.google.android.exoplayer2.source.dash">DashSegmentIndex</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>periodDurationUs</code> - The duration of the enclosing period in microseconds, or <a href="../../../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> if the period's duration is not yet known.</dd>
<dd><code>nowUnixTimeUs</code> - The current time in milliseconds since the Unix epoch.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The time, in microseconds, at which a new segment becomes available, or <a href="../../../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> if not applicable.</dd>
</dl>
</li>
</ul>
<a id="isExplicit()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>isExplicit</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;isExplicit()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../DashSegmentIndex.html#isExplicit()">DashSegmentIndex</a></code></span></div>
<div class="block">Returns true if segments are defined explicitly by the index.

 <p>If true is returned, each segment is defined explicitly by the index data, and all of the
 listed segments are guaranteed to be available at the time when the index was obtained.

 <p>If false is returned then segment information was derived from properties such as a fixed
 segment duration. If the presentation is dynamic, it's possible that only a subset of the
 segments are available.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../DashSegmentIndex.html#isExplicit()">isExplicit</a></code>&nbsp;in interface&nbsp;<code><a href="../DashSegmentIndex.html" title="interface in com.google.android.exoplayer2.source.dash">DashSegmentIndex</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Whether segments are defined explicitly by the index.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>
